package com.keensense.vcm.model.enums;

import javax.xml.bind.annotation.XmlEnumValue;

/**
 * @author lanjian
 * @date 2020/5/8 8:48 上午
 */
public enum ArchivesLibraryTypeEnum {

    @XmlEnumValue(value = "1") COMMON(1, "普通档案库"), @XmlEnumValue(value = "2") REALNAME(2, "实名档案库"),
    @XmlEnumValue(value = "3") UNREALNAME(3, "未实名档案库");

    private int value;

    private String desc;

    ArchivesLibraryTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ArchivesLibraryTypeEnum getByValue(int value) {
        ArchivesLibraryTypeEnum[] enums = ArchivesLibraryTypeEnum.values();
        for (ArchivesLibraryTypeEnum anEnum : enums) {
            if (value == anEnum.getValue()) {
                return anEnum;
            }
        }
        return null;
    }

}
